FROM meddream/jdk17

RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' >/etc/timezone

ARG JAVA_OPTS
ARG JAR_FILE
ARG NACOS_SERVER_ADDR

ENV JAVA_OPTS=${JAVA_OPTS}
ENV JAR_FILE=${JAR_FILE}
ENV NACOS_SERVER_ADDR=${NACOS_SERVER_ADDR}

EXPOSE 8888

COPY ${JAR_FILE} app.jar

ENTRYPOINT java  ${JAVA_OPTS} -server -jar app.jar

# mvn clean package -Pdev -DskipTests
# docker build --build-arg=JAR_FILE=target/gateway.jar -t gateway .
# docker run -d -p 8888:8888 --name gateway -v D:/logs/gateway:/logs gateway


